package com.yunhe.day322.dao;

import com.yunhe.day322.domain.Permission;
import com.yunhe.day322.domain.Role;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.yaml.snakeyaml.events.Event;

import java.util.List;

@Mapper
public interface RoleDao {
    public List<Role> findRolesByUserId(int userId);

    List<Role> findAll();

    void save(Role role);

    Role findById(int id);

    List<Permission> findOtherPermission(int id);

    void addPermissionToRole(@Param("roleid") int roleid, @Param("pid") int id);

    void deleteFromUserinfo(int id);

    void deleteFromRp(int id);

    void deleteRole(int id);
}
